# 控制层Control：实现界面打印和菜单选择
import business

def main():
    while True:
        print('-------欢迎来到记账本管理系统（Json版）----------------')
        print('1显示账单2写入账单3退出')
        choice = int(input('请输入你的选择：'))
        if choice == 1:
            business.show_bill()
        elif choice ==2:
            business.write_bill()
        elif choice ==3:
            print('正在退出')
            break
        else:
            print('输入有误')
if __name__ == '__main__':
    main()